<?php
/*
Author: Matt Mayers	http://mattmayers.com/
*/



/*
Set $wowhead_use_fopen to 1 if you need fopen to open URLs, otherwise libcurl is used.
DON'T USE fopen() unless libcurl isn't available. If you don't have either, you're SOL.
*/
$wowhead_use_fopen = 0;

header("Content-type: text/xml");
$url = "http://www.wowhead.com/?item=".urlencode(addslashes($_GET['item']))."&xml";
if($wowhead_use_fopen){
	$f = fopen($url, "rb");
	while(!feof($f)){
		print fread($f, 512);
	}
	fclose($f);
}
else{
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_exec($ch);
	curl_close($ch);
}
?>